const { articleRouter } = require('./article.js')
const { userRouter } = require('./user.js')

const routerArr = [articleRouter, userRouter]
const useRouters = (app) => {
  routerArr.forEach(item => {
    app.use(
      item.routes(),// 路由中的回调会被触发
      item.allowedMethods()// 允许请求方式比如get, post等
    )
  })

}

module.exports = useRouters